﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyServer.Common
{
    /// <summary>
    /// 为客户端提供存储对象
    /// </summary>
    public class ListenItem
    {
        /// <summary>
        /// 获取客户端的连接实例
        /// </summary>
        [DisplayName("客户端连接")]
        [Description("表示该侦听项绑定的客户端连接")]
        public object Connect { get; private set; }
        /// <summary>
        /// 获取该侦听对象最后一次数据接收的时间
        /// </summary>
        [DisplayName("最后通信时间")]
        [Description("表示该侦听对象最后一次数据接收的时间")]
        public int LastReciveDataTime { get; set; }

        /// <summary>
        /// 通过指定连接初始化客户端实例
        /// </summary>
        /// <param name="Connect"></param>
        public ListenItem(object Connect)
        {
            this.Connect = Connect;
            LastReciveDataTime = Environment.TickCount;
        }

    }
}
